package com.wtwd.campus.fjryE15.entity;

/**
 * 返回状态码枚举
 */
public enum FjryRespCode {
    FAILED(0, "failed"), //失败
    SUCCESS(200, "success"),//成功

    PERMISSION_DENIED(300, "权限不足"),

    PARAMS_ERROR(400, "参数错误"),

    ERROR(500, "服务器异常,请联系管理员"),
    TOKEN_UNAUTHORIZED(501, "token授权失败"),
    TOKEN_CONFLICT(502, "token冲突，可能在另一台设备登录"),
    USER_NOT_FOUNT(510, "用户未找到"),
    PASSWORD_ERROR(511, "密码错误"),
    USER_EXISTED(512, "账号已存在"),
    ABOVE_OPERATION(513, "越级操作"),
    ILLEGAL_OPERATION(514, "非法操作"),
    USER_NAME_EXIST(515, "用户名已存在"),
    USER_HAS_SUB_ACCOUNT(516, "用户下还存在子账号"),
    USER_ACCOUNT_OVERDUE(517, "账号已过期,续费后可重新使用"),


    DEVICE_NOT_FOUND(601, "设备不存在"),
    DEVICE_BINDED(602, "设备已被绑定"),
    DEVICE_NOT_ONLINE(603, "设备不在线"),
    IMEI_EXIT(607, "imei号已存在"),
    STUDENT_NOT_BIND_DEVICE(604, "学生未绑定设备"),
    DEVICE_EXISTS(605, "设备已存在"),
    STUDENT_BINDED_DEVICE(606, "学生已绑定了设备，请先解绑"),
    NOT_PLATFORM_DEVICE_CANNOT_BIND(607, "非平台设备，不能绑定"),
    NOT_H5_DEVICE_CANNOT_BIND(608, "非H5设备，不能绑定"),


    PHONE_EXIST(700, "号码已存在"),
    CLASS_PATTERN_EXIST(701, "该时间段已有课堂模式"),
    STUDENT_NOT_EXIST_CLASS(702, "学生不存在于班级"),
    AFFECTION_CAN_NOT_DEL(703, "亲情号不能删除"),
    CLASS_PATTERN_MAXED(704, "课堂模式达到上限"),
    WHITE_LIST_MAXED(705, "白名单达到上限"),
    WHITE_LIST_EXIST(706, "白名单号码已存在"),
    AFFECTION_CAN_NOT_UPDATE(707, "亲情号不能修改"),


    FILE_NOT_FORMAT_TEMPLATE(800, "文件不匹配模板"),
    FILE_FORMAT_ERROR(801, "文件格式错误"),
    FIRST_SHEET_CAN_NOT_NULL(802, "第一个sheet不能为空"),

    WX_USER_BINDED(900, "微信用户已绑定"),
    PHONE_NOT_PATRIARCH(901, "该号码非家长号码，请先添加为家长"),
    PHONE_BINDED(902, "该号码被别的微信用户绑定"),
    VERIFY_CODE_EXPIRED(903, "验证码过期"),
    VERIFY_CODE_ERROR(904, "验证码错误"),
    CODE_2_OPENID_FAILED(905, "code转openId失败"),
    STUDENT_MSG_ERROR(905, "学生信息错误"),


    DEVICE_OFF_LINE(1000, "当前设备不在线"),//设备离线

    DEVICE_NOT_EXIST(1001, "设备不存在"),//设备不存在

    NO_RIGHT_OPERATION(1002, "无权操作"),//无权操作

    NO_DATA(1003, "暂无数据"),//暂无数据

    NO_SOME_RIGHT_OPERATION(1004, "其中含有无权操作对象"),//其中含有无权操作对象

    REPEAT_BINDING(1005, "重复绑定"),//家长重复绑定一个学生

    ALREADY_EXISTS_SCHOOL(1100, "已经存在该学校"),
    ALREADY_EXISTS_CLASSES(1101, "已经存在该班级"),
    NOT_EXISTS_CLASSES(1102, "不存在该班级"),
    ALREADY_EXISTS_TEACHER(1103, "已经存在该教师"),
    ALREADY_EXISTS_ClASSES_TEACHER(1104, "该教师分配的班级已经存在班主任"),
    CLASS_NOT_EXIST(1006, "班级不存在"),//班级不存在

    MAIN_GUARDIAN_EXIST(1007, "该学生主监护人已存在"),//该学生主监护人已存在（添加家长时候判断）
    PATRIARCH_ROLE_EXIST(1008, "家长角色已存在"),//该学生此家长角色已存在（添加家长时候判断）
    STUDENT_EXIST(1009, "该手机号已绑定学生"),
    STUDENT_DEVICE_INCONFORMITY(1010, "学生信息与设备信息不一致"),

    ORG_DEL_LIMIT(2001, "该组织存在下级,无法删除"),
    ORG_EXIST_ROLE(2002, "该组织存在角色"),
    ORG_EXIST_SCHOOL(2003, "该组织存在学校"),
    ROLE_EXIST_USER(2004, "该角色存在用户"),
    ROLE_PERMISSION_ISNULL(2005, "角色权限为空"),
    CLASSES_EXIST_STUDENT(1010, "该班级还存在学生"),
    SCHOOL_EXIST_GRADE(1011, "该学校还存在年级"),
    CLASSES_EXIST_TEACHER(1012, "该学校还存在教师"),
    GRADE_EXIST_CLASS(1013, "该年级还存在班级"),
    GRADE_EXIST(1014, "该年级已存在"),
    EXIST_STUDENTNO(1020, "该学校已经存在该学号的学生"),
    PARAMETERIS_MiSSING(1021, "参数丢失"),

    NUMBER_HAD_USED(1030, "该号码已被使用"),//用于设备更换sim卡号码
    FILE_TOO_BIG(1031, "上传文件过大"),//上传文件太大
    NO_PERSONAL_SETTING(1032, "该用户暂无个性化设置"),

    DEVICEINFO_ERROR(1040, "设备信息有误"),
    EXIST_DEVICE_AFFECTION_LIST(1041, "该设备已经存在该亲情号"),
    EXIST_DEVICE_WHITE_LIST(1042, "该设备已经存在该白名单号码"),
    DEVICE_WHITE_LIST(1043, "已经达到白名单上限"),
    DEVICE_AFFECTION_LIST(1044, "已经达到亲情号码上限"),

    REQUEST_ILLEGAL(3001, "非法请求"),
    APP_KEY_NOT_FOUND(3002, "appKey不存在"),
    APP_SECRET_ERROR(3003, "appSecret错误"),
    REFRESH_TOKEN_ERROR(3004, "refreshToken错误"),
    PUSH_URL_ERROR(3005, "推送地址无响应或无效"),
    APP_KEY_DISABLE(3006, "appKey已被禁用"),
    NO_PERMISSION_VIEW_THIS_DATA(3007, "无权查看该数据"),
    TIME_SPAN_TOO_LARGE(3008, "时间跨度过大"),
    SEND_SUCCESS(3009, "发送成功，等待设备响应"),
    SAVE_COMMAND(3010, "设备离线，指令缓存成功，待设备上线后发送"),
    CAN_NOT_OPERATION_DEVICE(3011, "无权操作该设备"),
    SEQUENCE_EXIST_DATA(3012, "序列号上存在数据，无法添加"),
    SEQUENCE_NOT_EXIST_DATA(3013, "序列号上不存在数据，无法修改或删除"),
    VERIFY_PUSH_DATA(3014, "推送地址校验中"),
    NOT_SET_PUSH_URL(3015, "未设置推送地址"),
    TIME_PERIOD_TOO_MUCH(3016, "时间段太多"),
    FENCE_NOT_FOUND(3017, "围栏不存在"),
    TIME_PERIOD_FIELD_MISSING(3018, "围栏时间段字段缺失"),
    USER_NOT_BIND_DEVICE(3019, "用户未绑定设备"),
    AFFECTION_CAN_NOT_GREAT_3(3020, "亲情号序列最大不能超过3"),
    SOS_CAN_NOT_GREAT_3(3021, "SOS号码序列不能大于3"),
    WHITE_CALL_SEQ_NEED_LARGE_7(3022, "白名单序列号必须大于7"),

    CUSTOMER_EXIST(4000, "客户已存在"),
    UPLOAD_PEOPLE(4201, "人数已达上限"),
    WHITE_NUMBER_REPEAT(4202, "该号码已经存在"),
    CLASS_PATTERN_UPLOAD(4203, "课堂模式添加达上限"),
    USER_NO_BANDING_STUDENT(4204, "该用户未绑定学生"),
    SOS_NUMBER_UPLOAD(4205, "SOS号码添加达上限"),
    NO_TRACK_OR_UNBINDING_STUDENT(4206, "暂无轨迹信息或设备未绑定学生"),
    NO_STUDENT_OR_DEVICE_UNBINDING_STUDENT(4207, "班级暂无学生或查询设备未绑定学生"),
    DEVICE_BIND_STUDENT(4208, "该设备还存在绑定学生，请先删除绑定的学生"),
    STUDENT_NO_BANDING_PARENTS(4209, "该学生暂无绑定家长"),
    FIRST_REMOVE_MANAGER(4210, "管理员不可解绑有多个人员绑定的学生"),
    H5_USE_TIME_EXPIRE(4211, "使用权限已过期"),
    USER_INDEX_EXPIRE(4212, "用户登录过期"),
    FENCE_NAME_REPEAT(4213, "同一学生围栏名称不可重复"),
    DEVICE_FENCE_NAME_REPEAT(4214, "同一设备围栏名称不可重复"),
    STUDENT_NOT_ENTER_PLATFORM(4220, "该学生未录入平台，请联系学校"),
    DEVICE_NOT_BELONG_PLATFORM(4221, "该设备非平台设备"),
    STUDENT_DEVICE_NOT_MATCH(4222, "设备信息和学生信息不匹配"),
    WRITE_IMPORT_DATA(4223, "导入信息为空"),
    SCHOOL_NOT_EXIST(4224, "学校不存在"),
    DEVICE_SETTING_NOT_EXIST(4230, "该设备未配置设置信息"),
    WAIT_END_SET_SLEEP_TIME(4231, "设备目前处于待机模式，等到待机模式结束后会执行此指令"),
    TEACHER_NOT_EXIST(4232, "教师账号不存在"),
    TEACHER_NAME_NOT_SET(4233, "教师未设置姓名"),
    // 喜马拉雅API响应code
    WX_UESR_NOT_LOGIN(5001, "微信用户未登录卡片管理平台或账号被别的微信用户登录"),
    PARAM_OPENID_CANNOT_NULL(5002, "openId不能为空"),
    ALARM_HAD_FULL(5006, "闹钟个数已达上限（10个）"),

    ATTENDANCE_PRODUCT_EXISTS(6001, "考勤机设备已存在"),
    ATTENDANCE_RULE_NAME_EXISTS(6002, "考勤规则名称重复"),
    ATTENDANCE_NOT_EXISTS(6003, "考勤规则不存在"),
    ATTENDANCE_HAD_BINDING(6004, "该考勤规则正在被使用，请先删除相应考勤设置"),
    DEVICE_NOT_BANK(7000, "设备认证位置服务平台失败，请联系客服热线400-699-3111处理！"),
    H5_USER_BIND_DEVICE(7001, "该用户已绑定设备,如需切换绑定设备,请解绑后重新绑定"),
    MONITOR_PHONE_ERROR(7002,"非授权号码，操作失败!"),
    SOS_PONE_CEILING(7003,"超过设置sos最大设置数"),
    FAMILY_PONE_CEILING(7004,"超过设置亲情号最大设置数"),
    WHITE_PONE_CEILING(7005,"超过设置白名单最大设置数"),
    NONSUPPORT_UNBIND(7006,"H5暂不支持解绑功能"),
    ;

    private int code;
    private String msg;

    FjryRespCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
